Anti-Debugging Protection of Binaries with Proxy Code Execution

ABSTRACT

A first process operating on a computer comprises code to be executed in connection therewith, where the code includes at least one triggering device. A digital license corresponds to the first process and sets forth terms and conditions for operating the first process. A second process operating on the computer proxy-executes code corresponding to each triggering device of the first process on behalf of such first process. The second process includes a selection of options to thwart reverse engineering by a debugger if a debugger is detected. The options include execution by a proxy engine of a re-routed call, crashing the first process, detection ad elimination of a debugger related interrupt a call to an arbitrary function.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application is a continuation-in-part of U.S. applicationSer. No. 10/681,017, filed Oct. 8, 2003, entitled “First Computerprocess and second Computer Process Proxy-executing Code on BehalfThereof,” which is incorporated herein by reference in its entirety.

BACKGROUND

A computer application distributor wishes to distribute such computerapplication to each of many users or recipients in exchange for alicense fee or some other consideration. However, such distributortypically also wishes to restrict what each user or recipient can dowith such distributed computer application. For example, the distributorwould like to restrict the user from copying and re-distributing suchapplication to a second user, at least in a manner that denies thedistributor a license fee from such second user.

In addition, the distributor may wish to provide the user with theflexibility to purchase different types of use licenses at differentlicense fees, while at the same time holding the user to the terms ofwhatever type of license is in fact purchased. For example, thedistributor may wish to allow the application to be executed only alimited number of times, only for a certain total time, only on acertain type of machine, only on a certain type of rendering platform,only by a certain type of user, etc. Likewise, the distributor may wishto allow one user to pay a smaller license fee and access a smaller setof application functions and also to allow another user to pay a largerlicense fee and access a larger set of application functions, and thelike.

However, after distribution has occurred, such distributor has verylittle if any control over the distributed application. This isespecially problematic in view of the fact that the application may becopied and re-distributed to most any personal computer, presuming thatthe application is not otherwise protected in some manner from suchcopying and re-distribution. As should be appreciated, most any suchpersonal computer includes the software and hardware necessary to makean exact digital copy of such application, and to download such exactdigital copy to a write-able magnetic or optical disk, or to send suchexact digital copy over a network such as the Internet to anydestination.

Of course, as part of a transaction wherein the application isdistributed, the distributor may require the user/recipient of theapplication to promise not to re-distribute such application in anunwelcome manner. However, such a promise is easily made and easilybroken. A distributor may therefore attempt to prevent suchre-distribution through any of several known security measures.

One such security measure is product activation. In such productactivation, a customer acquiring a software application is provided witha product activation key corresponding thereto, which is a unique serialnumber and product identifier that acts as a proof of purchase or thelike. The provided product key is then entered during installation ofthe application on a particular computer device to act as a proffer thatthe application was acquired legally and/or otherwise properly. Theproduct activation key need not be and typically is not cryptographic innature, although a digital signature (which is cryptographic in nature)may be included to act as a guarantee that the product key is genuine.

The entered product key and an ID representative of the computer deviceare then sent to a product activation service as part of theinstallation process. As may be appreciated, the product activationservice determines whether the entered product key is valid, whether theproduct key has been employed before, and if so in connection with whatcomputer device. Typically, each product key enables an installation orre-installation of the application on a single computing device, as isset forth in a corresponding license agreement, although a product keymay also enable a set number of installations/re-installations onmultiple computer devices also.

Accordingly, if the product activation service determines that theentered product key has already been employed to install the applicationon another computer device (or has been employed a maximum number oftimes, for example), such activation service will not allow theinstallation of the application on the computer device to proceed, willnot allow a complete installation of the application on the computerdevice, will not allow the installed application to be used on thecomputer device, or the like, as the case maybe. Thus, activation asused herein may entail permission to install the application, permissionto perform some level of installation of the application, permission tocompletely install the application, some level of permission to use theapplication, complete permission to use the application, or the like.

If the activation service declines to activate the application for thecustomer based on an entered product key already being used inconnection with another computing device, or based on the enteredproduct key not supporting the level of activation desired, the customermust acquire another appropriate product key to install/completelyinstall/use the application on the computing device in the mannerdesired. Thus, the product key and the product activation service act toensure that the application is not nefariously or wantonlyinstalled/activated/used on multiple computing devices, such as may bein violation of any software license agreement associated with thesoftware product.

Note that as part of the activation process, the activation service mayreturn a digital version of the license to the computing device on whichthe application is associated. Such license may be tied to the computingdevice such that the license is not usable with any other computingdevice, and may express a level of activation, as well as license termssuch as application functions that are to be made available, functionsthat are to be made non-available, a period of activation or a number oftimes the application may be executed on the computing device, and thelike. In general, such license may express any limitations and/or rightsand also may express any policies that should be honored in connectionwith the execution of the application on the computing device, all asset forth by the distributor of the application or another entity.

With such license, then, a rights client controller with a licenseevaluator or the like may be employed on the computer along with thedistributed application to control operation and use of the applicationbased on an evaluation of whether the license so permits. However, aneed exists for an actual method and mechanism by which such rightsclient with such license evaluator may in fact control operation and useof the application based on the license. In particular, a need existsfor such a rights client with such a license evaluator that executescertain portions of code on behalf of and as a proxy for theapplication, but only if the license evaluator determines that thelicense allows such execution.

Another threat to the security of a binary object is unauthorizedreverse engineering. It is well known that a debugger is crucial to thesuccessful reverse engineering of an executable binary. The ability toprevent debugging is a critical part of a successful protection strategyof an IP sensitive binary. While many anti-debugging techniques havebeen implemented in the past they typically rely on two approaches. Thefirst is by leveraging all of the various programmatic interfacesprovided by the operating system to detect a debugger. The second is bysprinkling these queries throughout the binary. This approach waslimited by the fact that attackers could defeat this by either shimmingthe OS interfaces to return compromised results or find and remove the“sprinkled” checks from the binary. The combination of these techniquesonly slows down the use of debuggers and does not stop a debuggingprocess.

SUMMARY

The aforementioned needs are satisfied at least in part by the presentinvention in which a computer has thereon a first process operating onthe computer comprising code to be executed in connection therewith,where the code includes at least one triggering device, and a digitallicense corresponding to the first process, where the license sets forthterms and conditions for operating the first process. A second processoperating on the computer proxy-executes code corresponding to eachtriggering device of the first process on behalf of such first process.The second process includes a license evaluator for evaluating thelicense to determine whether the first process is to be operated inaccordance with the terms and conditions set forth in such license, andthe second process chooses whether to in fact proxy-execute the codecorresponding to each triggering device of the first process on behalfof such first process based at least in part on whether the licenseevaluator has determined that the first process is to be operated inaccordance with the terms and conditions of the license. Thus, the firstprocess is dependent upon the second process for operation thereof.

The second process monitors for when the first process executes atriggering device thereof. Upon such occurrence, the second processresponds thereto by determining an address of the triggering devicewithin the first process, locating in a table the code sectioncorresponding to the triggering device based on the determined address,and proxy-executing the located code section on behalf of the firstprocess.

To develop the first process, source code is developed in an appropriateprogramming language, and within such source code each of one or morecode sections that is to be proxy-executed by the second process isidentified. The source code is compiled into machine code such that anidentification of each identified code section is maintained, and themachine code is post-compiled with each identified code section thereininto final code representative of the first process based on theidentification of each identified code section by for each identifiedcode section converting same into a form accessible only by the secondprocess and not by the first process.

In one embodiment, the proxy process is used to detect and provideanti-debugger techniques to avoid reverse engineering. The proxy engineselects from one or more options that thwart reverse engineeringattempts after a debugger is detected.

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used to limit the scope of the claimed subject matter.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing summary, as well as the following detailed description ofthe embodiments of the present invention, will be better understood whenread in conjunction with the appended drawings. For the purpose ofillustrating the invention, there are shown in the drawings embodimentswhich are presently preferred. As should be understood, however, theinvention is not limited to the precise arrangements andinstrumentalities shown. In the drawings:

FIG. 1 is a block diagram representing an exemplary non-limitingcomputing environment in which the present invention may be implemented;

FIG. 2 is a block diagram representing an exemplary network environmenthaving a variety of computing devices in which the present invention maybe implemented;

FIG. 3 is a block diagram showing a first computer process, a secondcomputer process proxy-executing code on behalf of the computer process,and related elements in accordance with one embodiment of the presentinvention;

FIG. 4 is a flow diagram showing key steps performed in connection withthe first and second processes of FIG. 3 to proxy-execute code inaccordance with one embodiment of the present invention;

FIG. 5 is a flow diagram showing key steps performed to develop thefirst process of FIG. 3 in accordance with one embodiment of the presentinvention;

FIG. 6 depicts functional elements contributing to an implementation ofa proxy execution scheme involving detection of a debugger; and

FIG. 7 depicts a flow diagram showing steps performed to detect andthwart reverse engineering on a protected binary according to aspects ofthe invention.

DETAILED DESCRIPTION EXEMPLARY EMBODIMENTS

Computer Environment

FIG. 1 and the following discussion are intended to provide a briefgeneral description of a suitable computing environment in which theinvention may be implemented. It should be understood, however, thathandheld, portable, and other computing devices of all kinds arecontemplated for use in connection with the present invention. While ageneral purpose computer is described below, this is but one example,and the present invention requires only a thin client having networkserver interoperability and interaction. Thus, the present invention maybe implemented in an environment of networked hosted services in whichvery little or minimal client resources are implicated, e.g., anetworked environment in which the client device serves merely as abrowser or interface to the World Wide Web.

Although not required, the invention can be implemented via anapplication programming interface (API), for use by a developer, and/orincluded within the network browsing software which will be described inthe general context of computer-executable instructions, such as programmodules, being executed by one or more computers, such as clientworkstations, servers, or other devices. Generally, program modulesinclude routines, programs, objects, components, data structures and thelike that perform particular tasks or implement particular abstract datatypes. Typically, the functionality of the program modules may becombined or distributed as desired in various embodiments. Moreover,those skilled in the art will appreciate that the invention may bepracticed with other computer system configurations. Other well knowncomputing systems, environments, and/or configurations that may besuitable for use with the invention include, but are not limited to,personal computers (PCs), automated teller machines, server computers,hand-held or laptop devices, multi-processor systems,microprocessor-based systems, programmable consumer electronics, networkPCs, minicomputers, mainframe computers, and the like. The invention mayalso be practiced in distributed computing environments where tasks areperformed by remote processing devices that are linked through acommunications network or other data transmission medium. In adistributed computing environment, program modules may be located inboth local and remote computer storage media including memory storagedevices.

FIG. 1 thus illustrates an example of a suitable computing systemenvironment 100 in which the invention may be implemented, although asmade clear above, the computing system environment 100 is only oneexample of a suitable computing environment and is not intended tosuggest any limitation as to the scope of use or functionality of theinvention. Neither should the computing environment 100 be interpretedas having any dependency or requirement relating to any one orcombination of components illustrated in the exemplary operatingenvironment 100.

With reference to FIG. 1, an exemplary system for implementing theinvention includes a general purpose computing device in the form of acomputer 110. Components of computer 110 may include, but are notlimited to, a processing unit 120, a system memory 130, and a system bus121 that couples various system components including the system memoryto the processing unit 120. The system bus 121 may be any of severaltypes of bus structures including a memory bus or memory controller, aperipheral bus, and a local bus using any of a variety of busarchitectures. By way of example, and not limitation, such architecturesinclude Industry Standard Architecture (ISA) bus, Micro ChannelArchitecture (MCA) bus, Enhanced ISA (EISA) bus, Video ElectronicsStandards Association (VESA) local bus, and Peripheral ComponentInterconnect (PCI) bus (also known as Mezzanine bus).

Computer 110 typically includes a variety of computer readable media.Computer readable media can be any available media that can be accessedby computer 110 and includes both volatile and nonvolatile media,removable and non-removable media. By way of example, and notlimitation, computer readable media may comprise computer storage mediaand communication media. Computer storage media includes both volatileand nonvolatile, removable and non-removable media implemented in anymethod or technology for storage of information such as computerreadable instructions, data structures, program modules or other data.Computer storage media includes, but is not limited to, RAM, ROM,EEPROM, flash memory or other memory technology, CDROM, digitalversatile disks (DVD) or other optical disk storage, magnetic cassettes,magnetic tape, magnetic disk storage or other magnetic storage devices,or any other medium which can be used to store the desired informationand which can be accessed by computer 110. Communication media typicallyembodies computer readable instructions, data structures, programmodules or other data in a modulated data signal such as a carrier waveor other transport mechanism and includes any information deliverymedia. The term “modulated data signal” means a signal that has one ormore of its characteristics set or changed in such a manner as to encodeinformation in the signal. By way of example, and not limitation,communication media includes wired media such as a wired network ordirect-wired connection, and wireless media such as acoustic, RF,infrared, and other wireless media. Combinations of any of the aboveshould also be included within the scope of computer readable media.

The system memory 130 includes computer storage media in the form ofvolatile and/or nonvolatile memory such as read only memory (ROM) 131and random access memory (RAM) 132. A basic input/output system 133(BIOS), containing the basic routines that help to transfer informationbetween elements within computer 110, such as during start-up, istypically stored in ROM 131. RAM 132 typically contains data and/orprogram modules that are immediately accessible to and/or presentlybeing operated on by processing unit 120. By way of example, and notlimitation, FIG. 1 illustrates operating system 134, applicationprograms 135, other program modules 136, and program data 137.

The computer 110 may also include other removable/non-removable,volatile/nonvolatile computer storage media. By way of example only,FIG. 1 illustrates a hard disk drive 141 that reads from or writes tonon-removable, nonvolatile magnetic media, a magnetic disk drive 151that reads from or writes to a removable, nonvolatile magnetic disk 152,and an optical disk drive 155 that reads from or writes to a removable,nonvolatile optical disk 156, such as a CD ROM or other optical media.Other removable/non-removable, volatile/nonvolatile computer storagemedia that can be used in the exemplary operating environment include,but are not limited to, magnetic tape cassettes, flash memory cards,digital versatile disks, digital video tape, solid state RAM, solidstate ROM, and the like. The hard disk drive 141 is typically connectedto the system bus 121 through a non-removable memory interface such asinterface 140, and magnetic disk drive 151 and optical disk drive 155are typically connected to the system bus 121 by a removable memoryinterface, such as interface 150.

The drives and their associated computer storage media discussed aboveand illustrated in FIG. 1 provide storage of computer readableinstructions, data structures, program modules and other data for thecomputer 110. In FIG. 1, for example, hard disk drive 141 is illustratedas storing operating system 144, application programs 145, other programmodules 146, and program data 147. Note that these components can eitherbe the same as or different from operating system 134, applicationprograms 135, other program modules 136, and program data 137. Operatingsystem 144, application programs 145, other program modules 146, andprogram data 147 are given different numbers here to illustrate that, ata minimum, they are different copies. A user may enter commands andinformation into the computer 110 through input devices such as akeyboard 162 and pointing device 161, commonly referred to as a mouse,trackball or touch pad. Other input devices (not shown) may include amicrophone, joystick, game pad, satellite dish, scanner, or the like.These and other input devices are often connected to the processing unit120 through a user input interface 160 that is coupled to the system bus121, but may be connected by other interface and bus structures, such asa parallel port, game port or a universal serial bus (USB).

A monitor 191 or other type of display device is also connected to thesystem bus 121 via an interface, such as a video interface 190. Agraphics interface 182, such as Northbridge, may also be connected tothe system bus 121. Northbridge is a chipset that communicates with theCPU, or host processing unit 120, and assumes responsibility foraccelerated graphics port (AGP) communications. One or more graphicsprocessing units (GPUs) 184 may communicate with graphics interface 182.In this regard, GPUs 184 generally include on-chip memory storage, suchas register storage and GPUs 184 communicate with a video memory 186.GPUs 184, however, are but one example of a coprocessor and thus avariety of co-processing devices may be included in computer 110. Amonitor 191 or other type of display device is also connected to thesystem bus 121 via an interface, such as a video interface 190, whichmay in turn communicate with video memory 186. In addition to monitor191, computers may also include other peripheral output devices such asspeakers 197 and printer 196, which may be connected through an outputperipheral interface 195.

The computer 110 may operate in a networked environment using logicalconnections to one or more remote computers, such as a remote computer180. The remote computer 180 may be a personal computer, a server, arouter, a network PC, a peer device or other common network node, andtypically includes many or all of the elements described above relativeto the computer 110, although only a memory storage device 181 has beenillustrated in FIG. 1. The logical connections depicted in FIG. 1include a local area network (LAN) 171 and a wide area network (WAN)173, but may also include other networks. Such networking environmentsare commonplace in offices, enterprise-wide computer networks, intranetsand the Internet.

When used in a LAN networking environment, the computer 110 is connectedto the LAN 171 through a network interface or adapter 170. When used ina WAN networking environment, the computer 110 typically includes amodem 172 or other means for establishing communications over the WAN173, such as the Internet. The modem 172, which may be internal orexternal, may be connected to the system bus 121 via the user inputinterface 160, or other appropriate mechanism. In a networkedenvironment, program modules depicted relative to the computer 110, orportions thereof, may be stored in the remote memory storage device. Byway of example, and not limitation, FIG. 1 illustrates remoteapplication programs 185 as residing on memory device 181. It will beappreciated that the network connections shown are exemplary and othermeans of establishing a communications link between the computers may beused.

One of ordinary skill in the art can appreciate that a computer 110 orother client device can be deployed as part of a computer network. Inthis regard, the present invention pertains to any computer systemhaving any number of memory or storage units, and any number ofapplications and processes occurring across any number of storage unitsor volumes. The present invention may apply to an environment withserver computers and client computers deployed in a network environment,having remote or local storage. The present invention may also apply toa standalone computing device, having programming languagefunctionality, interpretation and execution capabilities.

Distributed computing facilitates sharing of computer resources andservices by direct exchange between computing devices and systems. Theseresources and services include the exchange of information, cachestorage, and disk storage for files. Distributed computing takesadvantage of network connectivity, allowing clients to leverage theircollective power to benefit the entire enterprise. In this regard, avariety of devices may have applications, objects or resources that mayinteract to implicate authentication techniques of the present inventionfor trusted graphics pipeline(s).

FIG. 2 provides a schematic diagram of an exemplary networked ordistributed computing environment. The distributed computing environmentcomprises computing objects 10 a, 10 b, etc. and computing objects ordevices 110 a, 110 b, 110 c, etc. These objects may comprise programs,methods, data stores, programmable logic, etc. The objects may compriseportions of the same or different devices such as PDAs, televisions, MP3players, televisions, personal computers, etc. Each object cancommunicate with another object by way of the communications network 14.This network may itself comprise other computing objects and computingdevices that provide services to the system of FIG. 2. In accordancewith an aspect of the invention, each object 10 or 110 may contain anapplication that might request the authentication techniques of thepresent invention for trusted graphics pipeline(s).

It can also be appreciated that an object, such as 10 c, may be hostedon another computing device 10 or 110. Thus, although the physicalenvironment depicted may show the connected devices as computers, suchillustration is merely exemplary and the physical environment mayalternatively be depicted or described comprising various digitaldevices such as PDAs, televisions, MP3 players, etc., software objectssuch as interfaces, COM objects and the like.

There are a variety of systems, components, and network configurationsthat support distributed computing environments. For example, computingsystems may be connected together by wireline or wireless systems, bylocal networks or widely distributed networks. Currently, many of thenetworks are coupled to the Internet, which provides the infrastructurefor widely distributed computing and encompasses many differentnetworks.

In home networking environments, there are at least four disparatenetwork transport media that may each support a unique protocol such asPower line, data (both wireless and wired), voice (e.g., telephone) andentertainment media. Most home control devices such as light switchesand appliances may use power line for connectivity. Data Services mayenter the home as broadband (e.g., either DSL or Cable modem) and areaccessible within the home using either wireless (e.g., HomeRF or802.11b) or wired (e.g., Home PNA, Cat 5, even power line) connectivity.Voice traffic may enter the home either as wired (e.g., Cat 3) orwireless (e.g., cell phones) and may be distributed within the homeusing Cat 3 wiring. Entertainment media may enter the home eitherthrough satellite or cable and is typically distributed in the homeusing coaxial cable. IEEE 1394 and DVI are also emerging as digitalinterconnects for clusters of media devices. All of these networkenvironments and others that may emerge as protocol standards may beinterconnected to form an intranet that may be connected to the outsideworld by way of the Internet. In short, a variety of disparate sourcesexist for the storage and transmission of data, and consequently, movingforward, computing devices will require ways of protecting content atall portions of the data processing pipeline.

The ‘Internet’ commonly refers to the collection of networks andgateways that utilize the TCP/IP suite of protocols, which arewell-known in the art of computer networking. TCP/IP is an acronym for“Transport Control Protocol/interface Program.” The Internet can bedescribed as a system of geographically distributed remote computernetworks interconnected by computers executing networking protocols thatallow users to interact and share information over the networks. Becauseof such wide-spread information sharing, remote networks such as theInternet have thus far generally evolved into an open system for whichdevelopers can design software applications for performing specializedoperations or services, essentially without restriction.

Thus, the network infrastructure enables a host of network topologiessuch as client/server, peer-to-peer, or hybrid architectures. The“client” is a member of a class or group that uses the services ofanother class or group to which it is not related. Thus, in computing, aclient is a process, i.e., roughly a set of instructions or tasks, thatrequests a service provided by another program. The client processutilizes the requested service without having to “know” any workingdetails about the other program or the service itself. In aclient/server architecture, particularly a networked system, a client isusually a computer that accesses shared network resources provided byanother computer e.g., a server. In the example of FIG. 2, computers 110a, 110 b, etc. can be thought of as clients and computer 10 a, 10 b,etc. can be thought of as the server where server 10 a, 10 b, etc.maintains the data that is then replicated in the client computers 110a, 110 b, etc.

A server is typically a remote computer system accessible over a remotenetwork such as the Internet. The client process may be active in afirst computer system, and the server process may be active in a secondcomputer system, communicating with one another over a communicationsmedium, thus providing distributed functionality and allowing multipleclients to take advantage of the information-gathering capabilities ofthe server.

Client and server communicate with one another utilizing thefunctionality provided by a protocol layer. For example,Hypertext-Transfer Protocol (HTTP) is a common protocol that is used inconjunction with the World Wide Web (WWW). Typically, a computer networkaddress such as a Universal Resource Locator (URL) or an InternetProtocol (IP) address is used to identify the server or client computersto each other. The network address can be referred to as a UniversalResource Locator address. For example, communication can be providedover a communications medium. In particular, the client and server maybe coupled to one another via TCP/IP connections for high-capacitycommunication.

Thus, FIG. 2 illustrates an exemplary networked or distributedenvironment, with a server in communication with client computers via anetwork/bus, in which the present invention may be employed. In moredetail, a number of servers 10 a, 10 b, etc., are interconnected via acommunications network/bus 14, which may be a LAN, WAN, intranet, theInternet, etc., with a number of client or remote computing devices 110a, 110 b, 110 c, 110 d, 110 e, etc., such as a portable computer,handheld computer, thin client, networked appliance, or other device,such as a VCR, TV, oven, light, heater and the like in accordance withthe present invention. It is thus contemplated that the presentinvention may apply to any computing device in connection with which itis desirable to process, store or render secure content from a trustedsource.

In a network environment in which the communications network/bus 14 isthe Internet, for example, the servers 10 can be Web servers with whichthe clients 110 a, 110 b, 110 c, 110 d, 110 e, etc. communicate via anyof a number of known protocols such as HTTP. Servers 10 may also serveas clients 110, as may be characteristic of a distributed computingenvironment. Communications may be wired or wireless, where appropriate.Client devices 110 may or may not communicate via communicationsnetwork/bus 14, and may have independent communications associatedtherewith. For example, in the case of a TV or VCR, there may or may notbe a networked aspect to the control thereof. Each client computer 110and server computer 10 may be equipped with various application programmodules or objects 135 and with connections or access to various typesof storage elements or objects, across which files may be stored or towhich portion(s) of files may be downloaded or migrated. Thus, thepresent invention can be utilized in a computer network environmenthaving client computers 110 a, 110 b, etc. that can access and interactwith a computer network/bus 14 and server computers 10 a, 10 b, etc.that may interact with client computers 110 a, 110 b, etc. and otherdevices 111 and databases 20.

Proxy Execution of Code

In the present invention, a rights client with a license evaluator andin connection with a product activation service controls operation anduse of an application based on a corresponding license by executing codeon behalf of and as a proxy for an application, but only if the licenseevaluator determines that the license allows such execution. Thus, therights client with the license evaluator enforces the license as againsta user of the application.

As may be appreciated, although the present invention is disclosedprimarily in terms of the rights client with the license evaluator, theapplication, the license, and the product activation service, suchpresent invention may also be employed in connection with alternateelements without departing from the spirit and scope of the presentinvention. For example, the application may instead be any applicationor type of process running on a computer, including a program, anoperating system, and the like, or even a piece of digital content suchas an audio recording or multimedia presentation. Similarly, the licensemay instead be any sort of permission token, with or without specificpermission parameters, and the license evaluator may instead be any kindof device for evaluating such a permission token. Likewise, the productactivation service may instead be any variety of permission-grantingauthority, and the rights client may instead be any variety ofcontrolling authority that can also proxy-execute code. Accordingly, andmore generally, in the present invention, a second process on a computercontrols the operation and use of a first process on a computer byexecuting code on behalf of and as a proxy for the first process.

Turning now to FIG. 3, it is seen that in one embodiment of the presentinvention, a first process such as an application 30 is dependent upon asecond process such as a rights client 32 to proxy execute at least someportion of code for the application 30, where the rights client 32includes a license evaluator 34 or the like. Accordingly, the rightsclient 32 may choose whether to in fact proxy execute the code for theapplication 30 based, among other things, on whether the licenseevaluator 34 has access to a license 36 corresponding to the application30, and on whether the license 36 has permissions or rights that allowor at least do not prohibit the action corresponding to the code to beexecuted. Note that such a license 36 and the license evaluation 34 ofthe rights client 32 are known or should be apparent to the relevantpublic and therefore need not be disclosed herein in any detail.

In one embodiment of the present invention, and referring now to FIG. 4,the application 30, rights client 32, and license evaluator 34 areconstructed to operate on a computer 110 (FIG. 1) or the like asfollows. Typically, either a user or another process on the computer 110instantiates the application 30 on such computer 110 as theaforementioned first process (step 401), and as part of an initializingprocess such application 30 ensures that the rights client 32 with thelicense evaluator 34 (hereinafter, ‘rights client 32’) is instantiatedon the computer 110 as the aforementioned second process (step 403).Thereafter, the application 30 establishes a connection with the rightsclient 32 (step 405). Note that it may be the case that the rightsclient 32 is already instantiated or it may be the case the rightsclient 32 must be newly instantiated, either by the application 30,another process, the user, or the like.

Once step 405 is performed, and presuming that a license 36corresponding to the application 390 is available to the rights client32 and the license evaluator 34 thereof, the application 30 can querythe rights client 32 to have the license evaluator 34 thereof determinebased on the license 36 the rights the application 30 has based on suchlicense 36, and the application 36 can then operate based on suchrights. However, it is to be appreciated that a nefarious entity wishingto subvert the license 36 might choose to attack the application 30 byre-directing the query to a stub rights client that would in effectgrant all rights to the application 30 without regard to any license 36,present or otherwise. Alternatively, such a nefarious entity mightchoose to spoof communications between the application 30 and the rightsclient 32 or may wish to attack the rights client 32 itself if theapplication 30 cannot be attacked. Note, though, that the latter case isless likely inasmuch as the rights client 32 should be highly secure andprotected from such an attack.

Accordingly, and in one embodiment of the present invention, the rightsclient 32 is required to proxy-execute at least some portions of code onbehalf of the application 30 so that the application is dependent on therights client 32. Put another way, by requiring the rights client 32 toproxy-execute at least some portion of code on behalf of the application30, the aforementioned nefarious entity cannot subvert the license 36 bysomehow removing the rights client 32 from participating in the methodof FIG. 4. Instead, the rights client 32 must participate toproxy-execute code on behalf of the application 30, and while doing sothe license evaluator 34 of the rights client 32 can also performevaluation functions with regard to the license 36. Thus the rightsclient 32 does not merely provide the application 30 with a true orfalse type of response that could be spoofed.

In one embodiment of the present invention, the license 36 includesencoded information regarding the code that the rights client 32 is toproxy-execute. Thus, the license 36 must be available to the rightsclient 32 for same to proxy-execute on behalf of the application 30. Forexample, the encoded information may include the code, a reference to alocation of the code, a decryption key for decrypting an encryptedversion of the code, or the like.

As should now be appreciated, in order to effectuate proxy-execution,the application 30 must be pre-processed to define the code that is tobe proxy-executed, to remove same from such application 30, and toappropriately store such removed code in a form proxy-executable by therights client 32. In one embodiment of the present invention, then, andturning now to FIG. 5, a method of pre-processing the application 30 toeffectuate proxy-execution is shown.

Preliminarily, and as may be appreciated, a developer develops sourcecode 38 (FIG. 3) for the application 30 in an appropriate programminglanguage, such as for example a C-type programming language (step 501).In doing so, and significantly, the developer identifies within suchsource code 38 for the application 30 each of one or more code sectionsthat is to be proxy-executed (step 503). As may be appreciated, eachsuch proxy-executed code section identification may comprise anyappropriate mark, tag, command, or the like without departing from thespirit and scope of the present invention. Thereafter, the developercompiles the source code 38 with a compiler 40 into machine code 42(step 505).

Note that the developer may identify each code section within the sourcecode 38 based on any particular criteria without departing from thespirit and scope of the present invention. For example, if the developermerely wishes to trigger proxy-execution from time to time so as toensure the rights client 32 is present and is allowing the application30 to operate based on a corresponding license 36, each such identifiedcode section may be decided upon in a fairly random manner. However, ifthe developer wishes to trigger proxy-execution at specific times and/orwith regard to specific sections of code, each such identified codesection must be decided upon in a more targeted manner. Note with regardto the latter that it may be the case that an identified code sectionspecifies a particular license right. In such a situation, it may alsobe the case that the rights client 32 will proxy-execute such identifiedcode section only if the specified license right in the license 36 ismet.

As may be appreciated, the compiler 40 may be any appropriate compilerwithout departing from the spirit and scope of the present invention.Significantly, the compiler 40 is constructed to maintain each codesection identification in the machine code 42 so that post-compileprocessing may be performed on the code section identified thereby. Suchmaintaining maybe performed in any appropriate manner without departingfrom the spirit and scope of the present invention. For example, thecompiler 40 may pass the identification from the source code 38 to themachine code 42 in a recognizable form, or may create a scratch table(not shown) with such information therein.

Thus, and in one embodiment of the present invention, after suchcompiling, the developer post-compiles the machine code 42 with eachrecognizable code section identification therein with a post-compiler 44into the final code representative of the application 30, where thepost-compiler 44 converts each identified code section into a formaccessible only by the rights client 32 and not by the application 30,such as for example by removing each identified code section in themachine code 42 from such application 30 or otherwise makes suchidentified code section inaccessible (step 507). As may be appreciated,such post-compiler 44 is constructed to retrieve each code sectionidentification, either from the machine code 42, the aforementionedscratch table, or elsewhere, and operate based thereon.

In one embodiment of the present invention, for each identified codesection in the machine code 42, the post-compiler 44 removes theidentified code section from the machine code 42 (step 507 a), replacesthe removed code section with a triggering device (step 507 b), notes anaddress of the triggering device within the application 30 (step 507 c),and stores the removed code section and the noted address in a table 46(FIG. 3) or the like (step 507 e). If necessary or advisable, eachremoved code section may stored in the table 46 in an encrypted formdecryptable by the rights client 32 (step 507 d). As was set forthabove, such table 46 may be made available to the rights client 32 bybeing set forth in the license 36, or by being set forth in anotherlocation. Note that the table 46 may be signed or otherwise protectedfrom alteration by a verifying device such as a hash.

As may be appreciated, by replacing the removed code section with thetriggering device, and presuming that the triggering device is shorterthan the removed code section, the post-compiler 44 shortens the machinecode 42. Note that the triggering device may be any appropriatetriggering device without departing from the spirit and scope of thepresent invention, as long as the triggering device is recognizable as asignal that the rights client 32 is needed to proxy-execute thecorresponding removed code section. For example the triggering devicemay be a particular exception that would get the attention of the rightsclient 32.

After the post-compiler 44 is finished, and as should now beappreciated, such post-compiler 44 outputs final code representative ofthe application 30 (hereinafter, ‘the application 30’) and the table 46(step 509). As was set forth above, such table 46 may be made availableto the rights client 32 by being set forth in the license 36, or bybeing set forth in another location separate from the application 30. Itmay for example be the case that the table 46 with encrypted removedcode sections therein is placed in the license 36 along with adecryption key for decrypting each encrypted code section, where thedecryption key is itself encrypted in a manner decryptable by the rightsclient 32. Note that by separating the table 46 from the application 30,the application 30 has no innate access to the table 46 or the removedcode sections therein.

Thus, and returning now to FIG. 4, during runtime, and after theapplication 30 and rights client 32 have been instantiated, the rightsclient 32 attaches itself to the application 30 in the manner of adebugger or the like so that the rights client 32 can monitor theapplication 30 for when each triggering device/exception therein isexecuted (step 407). As may be appreciated, the rights client 32monitors the application 30 for the particular triggeringdevice/exception (hereinafter, ‘exception’) that signals that the rightsclient 32 is to proxy-execute on behalf of the application 30. Thus, onevery breakpoint exception, the rights client 32 determines whether theexception source is a removed code section, and if so the rights clientproxy-executes the removed code section, presuming the license 36 soallows.

In an alternate embodiment of the present invention, the rights client32 does not attach itself to the application 30 to monitor for anexception, but instead receives the exception from an operating systemoperating the computer 110. However, such an arrangement is indirect andtherefore slower. Another alternative would be to have each triggeringdevice be a call to the rights client 32, although such a strategy isslightly more complex as compared to an exception and is more prone toattack by a nefarious entity.

At some point, the application 30 may explicitly request permission tooperate from the rights client 32 based on the license 36. In response,the rights client 32 searches for the license 36, the license evaluator34 evaluates such license 36, and the rights client 32 returns suchrequested permission if the evaluation of the license evaluator 34 ispositive. Note, though, that such explicit request for permission andresponse are ancillary to the present invention. Rather, in the presentinvention, the rights client 32 is actuated based on an exception or thelike from the application 30 and not based on an explicit request fromthe application 30. Thus, in the present invention, the rights client 32can withhold performance of a function on behalf of the application 30even when the application 30 never requested permission to perform suchfunction.

At any rate, in the course of operating, the application 30 at somepoint executes an exception in the code thereof, where such exceptionwas placed in the application 30 by the post-compiler 44 in place of aremoved identified code portion (step 409). As should be understood,upon executing the exception, the application 30 halts until receivingnotice that the exception has been dealt with (step 411). Inasmuch asthe rights client 32 is attached to the operating application 30 and islistening for such exception from such application 30, such rightsclient 32 notes the exception (step 413) and responds thereto (step415).

In particular, to respond to the exception, the rights client firstdetermines the address of the exception within the application 30 (step415 a), locates the corresponding code section in the table 46 based onsuch address (step 415 b), proxy-executes such corresponding codesection on behalf of the application (step 415 e), and then signals tothe application 30 that the exception has been dealt with (step 415 f).As may be appreciated, the application 30 may then proceed (step 417).Note that if the corresponding code section is encrypted, the rightsclient 32 must decrypt the located corresponding code section beforeproxy-executing same (step 415 c). Note, too, that a particular codesection may require that the license evaluator 34 of the rights client32 first verify that the license 36 grants the rights necessary toproxy-execute such code section on behalf of the application 30 (step415 d). As may be appreciated, the rights client 32 proxy-executes suchcode section only if the license grants the right to do so. Otherwise,the rights client 32 declines to do so. In the latter case, it may bethat the rights client 32 returns an appropriate message to theapplication 30.

It is to be appreciated that a rights client 32 should not beproxy-executing any arbitrary code section, especially inasmuch as therights client 32 should be especially secure and therefore could have arelatively large amount of operating rights with respect to the computer110. Put another way, the rights client 32 should not be performingactions that the application would not have operating rights to perform,such as altering certain system registers, accessing memory areas ofother applications and the operating system, and the like. Accordingly,in one embodiment of the present invention, the post-compiler 44 duringoperation thereof ensures that each code section removed and storedthereby is not of a sensitive nature. For example, it may be the casethat the post-compiler 44 during operation thereof ensures that eachsuch code section does not affect system memory. Of course, other basesfor filtering code sections may be employed without departing from thespirit and scope of the present invention. Note that if a code sectionincludes sensitive code, it may be that the post-compiler isolates suchsensitive code and removes only sub-portions of code on either side ofthe sensitive code.

In one embodiment of the present invention, the rights client 32proxy-executes on behalf of the application only if a valid license 36corresponding to such application 30 is available to the rights client32. In such a case, it may be that the purpose of each exception andproxy-execution based thereon is merely to occasionally check that thelicense 36 is still present and still valid. In an alternate embodiment,the rights client 32 proxy-executes on behalf of the application withoutregard to any corresponding valid license 36. In such a case, it may bethat the purpose of each exception and proxy-execution based thereon ismerely to tie the application 30 to the rights client 32, whichpresumably is tied to the computer 110, thus tying the application 30 tothe computer 110.

In one embodiment of the present invention, the application 30 asproduced by the post-compiler 44 may include multiple types ofexceptions, each triggering the rights client 32. However, eachdifferent type of exception is handled differently. For one example, onetype of exception may require the rights client 32 to check the license36 while another type may not. For another example, different types ofexceptions could require access to different tables 46, or could requiredifferent decryption keys and/or methods.

As disclosed herein, the application 30, the rights client 32, and thelicense 36 are separate constructs. Nevertheless, it should beappreciated that such items may be combined in any manner withoutdeparting from the spirit and scope of the present invention. Forexample, the application 30 could include the rights client 32, or therights client 32 could include the license 36. Note, though, that in atleast some instances combined items may be more susceptible to an attackfrom a nefarious entity.

As also disclosed herein, the rights client 32 proxy-executes code onbehalf of the application 30. Alternatively, the rights client 32 mayoperate to modify the application 30 to include the to-be-executed code,allow such application to execute such code, and then again modify theapplication 30 to remove such code. Note, though, that such anarrangement may be more susceptible to attack by a nefarious entity,especially in the moments when the application 30 is modified to includethe to-be-executed code.

As may be appreciated, one especially useful aspect of the presentinvention is that the rights client 32 may now perform especially securefunctions on behalf of the application 30 such that a nefarious entityis thwarted from affecting such functions. For example, it may be thecase that a term in a license 36 affects how many times the application30 can perform a specific action. Although the application 30 couldobtain such term from such license 36, having the application 30 do socould allow a nefarious entity to intervene in the process to subvertsame. Instead, in one embodiment of the present invention, the rightsclient 32 is employed to proxy-execute code for the application 30relating to such term in such license 36, including obtaining the termand employing same.

Anti-Debugging Approaches

As mentioned above, one threat to an executable binary is the use of adebugger to reverse engineer the binary. The current proxy-executiontechnique may be used in conjunction with other methods to thwart theefforts to reverse engineer a binary.

FIG. 6 depicts a system of resources 600 used in accordance with thecurrent invention to thwart the use of a debugger. In FIG. 6, a usermode 680 set of resources and a kernel mode 690 set of resources. One ofskill in the art will understand that the user mode and kernel moderesources include computing elements such as a processor, memory, I/O,display, and other items as shown in FIG. 1. An anti-debugging protectedbinary object 620 is shown associated with the user mode resources 680.The anti-debugging binary has a portion 625 that contains portion ofcode removed from the main binary and targeted for proxy-executionaccording to aspects of the invention discussed above. This removedportion 625 may be optionally encrypted.

During execution of the anti-debugging protected binary 620, anexception may be generated which calls into action the exception handler630. The execution handler 630, along with the proxy execution engine640, employs resources such as user mode debugging resources 610 andkernel mode debugger resources 650 to check for the presence of anactive debugger. If no debugger is detected, the proxy execution engine640 executes the removed code section 625. It does this by decryptingthe encrypted section 625 if necessary and processing the code sequencethat is indicated as being part of the main binary 620. After the proxyexecution by the engine 640, the exception handler 630 informs theanti-debugging protected binary 620 that the exception was properlydispatched and the execution of the anti-debugging binary 620 mayproceed.

However, if the exception handler 630 detects the presence of adebugger, then execution of the proper code in section 625 does not takeplace. Here, the presence of a debugger modifies the expected executionof section 625 by the proxy engine 640. According to an aspect of theinvention, during runtime, the removed sections 625 can only be executedby the proxy execution engine 640 when there is not presence of adebugger debugging the protected code.

Detection of a debugger may be accomplished many ways. In one method,the presence of a debugger is detected by the utilization of commonlyemployed debugger registers in either the user mode debugger resources610 or by the kernel mode debugger resources. Another method to detect adebugger is the detection of the use of a communication port that iscommonly used by debuggers. Another method to detect the presence of adebugger is the use of a specific interrupt (i.e. <INT3>) anddetermining that a debugger is requesting system resources. Yet anothertechnique for detecting the use of a debugger is to identify vectoredexceptions and handlers that are operating outside of the softwareprocess. Vectored exceptions of this character may indicate that adebugger is present. Other techniques for debugger detection may be usedas is known by those of skill in the art. Once a debugger is detected,then the proxy engine has options on how to respond. In implementation,the selection of debugger resources to query are those that are alsorequired for the debugger to function. This selection was made in orderto prevent the attacker from falsifying this data.

The proxy engine 640 is in a unique situation that makes it ideal forhosting anti-debugging techniques. In one aspect, the proxy engine 640design can cause unexpected errors in the process when a debugger isattached. In another aspect of the response of a debugger, the proxyengine 640 can cause the anti-debugging protected binary 620 to executean alternate code path. One aspect of this response is that thealternate code path is invisible to the debugger. Accordingly, thedebugger is unaware of the change in code path. The debugger is unawarebecause the choice of code path is performed in the kernel 690 and notthe application binary 620 or the debugger itself. This may be termedcall re-routing because the call to execute the appropriate functionalportion of code in section 625 is changed. The changed or re-routed callcan be a call to a dummy function which essentially leads thedebugger/observer to either non-functional or a false result. Using thisre-routing response, the logical functionality of the binary may betwisted because calling any incorrect function will mislead the debuggerand cause the expected functionality of the protected binary 620 to beadversely disturbed. In implementation, the addresses of both the realand the dummy functions are contained within the encrypted section 625,making it difficult for the attacker to extract this call flow. Duringexecution the proxy engine 640 will call the appropriate function basedon the presence of a debugger.

Another proxy execution engine 640 response to the presence of adebugger is to crash the process. Essentially, this option, if taken bythe proxy engine 640 would permanently stop the execution of theanti-debugging protected binary 620 and thus prevent any debugger fromperforming reverse engineering on the protected binary 620. Inimplementation, when anti-debugging protected code 620 executes and theexception is handled, the proxy engine 640 queries some systeminformation to detect the existence of a debugger. If there is adebugger attached then instead of the proxy engine executing the properinstruction, it will execute the dummy code and pass back the context.This will cause the process of the protected binary to exhibitunexpected behavior and will eventually crash the process in such a waythat it is difficult to directly determine that proxy engine 640 was thecause of the crash. If no debugger is attached, execution will continueas normal. The crash results in an unexpected end to the protectedprocess being performed by the binary.

Yet another response to the presence of a debugger is that the proxyengine 640 can filter out any software breakpoints it handles. Thus, forexample, if an interrupt, such as the <INT3> interrupt or otherequivalent break is detected, the proxy can simply negate the interruptand ignore the debugger request. It should be noted that all of theseprotections leverage the same core functionality. In all cases, thebinary 620 is instrumented in the same way as with a traditional proxyas explained herein, except that it contains meta-data for theanti-debugging settings. In implementation, the proxy engine 640, due toits integration with the memory manager, can filter any softwarebreakpoints added to the binary 620 prior to those breakpoints reachingfirst chance exception handlers. Filtering those debugger breakpointsout frustrates the purpose of the debugger.

FIG. 7 depicts a method 700 to detect and respond to the presence of adebugger in a system that incorporates proxy code execution. Initially,when a developer has code that requires anti-debugging protection, heselects the sensitive code paths and instruments them with anobfuscation tool in a process described herein. This obfuscation toolreplaces assembly instructions in the sensitive code paths with softwareexceptions, which are the same as the debugger interrupts. The originalinstructions are then encrypted and appended to the executable binary inan encrypted section. Once instrumented as such, these code paths willnot be able to execute as part of the binary without the proxy engine inthe kernel emulating these separated instruction on behalf of theapplication.

Step 705 in FIG. 7 indicates that the application with the separatedcode (such as in FIG. 6, items 620 and 625), a rights client and alicense evaluator are instantiated. The rights client attaches to theapplication in step 710. The application executes a triggering mechanismin step 715. the triggering mechanism typically being an interrupt, abreakpoint, or the like. As a result, the application halts in step 720,and the rights client notices the exception in step 725. Steps 705through 725 are similar to steps 401 through 413 of FIG. 4.

Returning to FIG. 7, the rights client, using a proxy engine, checks forthe presence of a debugger in step 730 by analyzing user mode and kernelmode debugger resources, the use of interrupts, the use of debuggercommunication ports and the like. Based on the analysis, a decision ismade as to the presence of a debugger in step 735. If no debugger ispresent, the proxy execution engine executes the section of codeassociated with the exception at step 750. If the section of code to beexecuted by the proxy engine is encrypted, then the engine firstdecrypts the code and processes the relevant code section. Afterprocessing is completed, a signal is sent to the application at step 755that the exception was handled fully and that the application mayproceed. It is noted that steps 750-755 are similar to steps 415A-415Fof FIG. 4 where a license, if present is checked to verify that theterms of the license are met before the proxy engine executes thatrelevant portion of code.

If, at decision 735, it is determined that a debugger is present, thenthe method 700 takes step 740 and selects from a list of optionsdesigned to thwart the debugger. For instance, one option, as discussedabove is to select to re-route a call statement so that the process 700will eventually execute a dummy function. This selection may eventuallylead to an address call to an “incorrect” section of code that leads theapplication to an undesired direction when the proxy engine eventuallyexecutes the dummy function. Another option is the selection of to crashthe application binary. Another selection can be to intercept theinterrupt or other breakpoint. Another selection may be to call anyarbitrary function and redirect the application to that function.

At step 745, the selection made at step 740 is executed. This involvesperforming the selected anti-debugging operation such that reverseengineering of the application binary is prevented. As a result, thewould-be recipient of the reverse engineering information is misled orotherwise stopped from gaining knowledge of the functionality of theprotected application binary. In some instances, as will be appreciatedby those in the art, a perception that the application binary ismisbehaved may be present. In other instances, it may be invisible tothe would-be recipient of the reverse engineering information that theproxy execution engine has misled the application binary. In eitherinstance reverse engineering of the application binary is tangiblyavoided. An operator of the debugger will likely observe that reverseengineering of the application binary has been halted or is incomplete.For example, the result of an application crash is observable as astalled application. The result of a re-routed exception call is anunexpected operation that may be visible on a display. The result of anintercepted interrupt is a failure of the debugger to halt theapplication. These results are tangible evidence that the anti-debuggingprotection if the application binary is working.

CONCLUSION

The programming necessary to effectuate the processes performed inconnection with the present invention is relatively straight-forward andshould be apparent to the relevant programming public. Accordingly, suchprogramming is not attached hereto. Any particular programming, then,may be employed to effectuate the present invention without departingfrom the spirit and scope thereof.

In the present invention, a method and mechanism are provided by which arights client 32 with a license evaluator 34 control operation and useof an application 30 based on a license 36 corresponding thereto. Therights client 32 with the license evaluator 34 executes certain portionsof code on behalf of and as a proxy for the application 30, where thelicense evaluator 34 can determine if the license 36 allows suchexecution.

In the present invention, a method and mechanism to detect the presenceof a debugger utilizes a proxy execution engine. If a debugger is notpresent, execution of an application binary proceeds as previouslydescribed. If a debugger is present, then several options may beundertaken by the proxy engine to circumvent the possibility of reverseengineering the application binary. Each option relies on apre-established protected binary having code segments which are executedby a proxy engine.

It should be appreciated that changes could be made to the embodimentsdescribed above without departing from the inventive concepts thereof.It should be understood, therefore, that this invention is not limitedto the particular embodiments disclosed, but it is intended to covermodifications within the spirit and scope of the present invention asdefined by the appended claims.

The various techniques described herein may be implemented in connectionwith hardware or software or, where appropriate, with a combination ofboth. Thus, the methods and apparatus of the invention, or certainaspects or portions thereof, may take the form of program code (i.e.,instructions) embodied in tangible media, such as floppy diskettes,CD-ROMs, hard drives, or any other machine-readable storage medium,wherein, when the program code is loaded into and executed by a machine,such as a computer, the machine becomes an apparatus for practicing theinvention.

While aspects of the present invention has been described in connectionwith the preferred embodiments of the various figures, it is to beunderstood that other similar embodiments may be used or modificationsand additions may be made to the described embodiment for performing thesame function of the present invention without deviating therefrom.Furthermore, it should be emphasized that a variety of computerplatforms, including handheld device operating systems and otherapplication specific operating systems are contemplated, especially asthe number of wireless networked devices continues to proliferate.Therefore, the claimed invention should not be limited to any singleembodiment, but rather should be construed in breadth and scope inaccordance with the appended claims.

1. A computer-implemented method to prevent reverse engineering ofprotected software, the method comprising: instantiating the protectedsoftware, wherein the protected software comprises a protected binarycode and an encrypted section of code missing from the protected binarycode, the encrypted section of code having computer instructionsnecessary for execution of the protected binary, the protected binarycode having calls to execute relevant portions of the computerinstructions of the encrypted section of code using a proxy executionengine; executing the protected binary code until a call to the proxyexecution engine generates an exception and halts execution of theprotected software; checking for the presence of a debugger beforestarting execution of the encrypted section of code; upon detecting thedebugger, selecting a response to detection of the debugger from one ofthe group consisting of re-routing execution of the encrypted section ofcode, crashing the protected software, and intercepting an interruptassociated with the exception; and executing the selected response todetection of the debugger, wherein operation of the debugger to reverseengineer the protected software is prevented.
 2. The method of claim 1,wherein checking for the presence of a debugger comprises examiningdebugger registers in debugger resources associated with a kernel anddetermining if the debugger registers are being utilized.
 3. The methodof claim 1, wherein checking for the presence of a debugger comprisesdetecting if a debugger communication port is active.
 4. The method ofclaim 1, wherein checking for the presence of a debugger comprisesperforming one of the group consisting of detection of a debuggerinterrupt requesting system resources and detection of vectoredexceptions occurring externally to the protected software.
 5. The methodof claim 1, further comprising: if the selected response is re-routingexecution of the encrypted section of code, then the proxy executionengine transfers control to a dummy function.
 6. The method of claim 5,wherein an address of the dummy function is present in the encryptedsection of code.
 7. The method of claim 1, further comprising: if theselected response is intercepting an interrupt associated with theexception, then the intercepted interrupt is removed and ignored by thedebugger.
 8. The method of claim 1, further comprising: if the selectedresponse is crashing the protected software, the result comprises anunexpected end of a process performed by the protected software.
 9. Acomputer system for applying an anti-debugging protection mechanism toprotected software during run time, the system comprising: computermemory; an operating system having program code providing resources tosupport a debugger; a processor for executing protected binary code ofthe protected software, wherein the protected binary code generates atleast one exception; an exception handler that directs the computersystem to execute an encrypted section of the protected software, theencrypted section comprising code missing from the protected binarycode, the encrypted section of code having computer instructionsnecessary for complete execution of the protected binary code; a proxyexecution engine that executes the encrypted section of code, the proxyengine comprising a debugger detection mechanism, wherein for eachexception generated, the proxy execution engine checks for presence of adebugger using the debugger detection mechanism before returning fromthe exception.
 10. The system of claim 9, wherein the debugger detectionmechanism comprises a mechanism to examine debugger registers associatedwith a kernel and determine if the debugger registers are beingutilized.
 11. The system of claim 9, wherein the debugger detectionmechanism checks for the presence of a debugger by determining if adebugger communication port is active.
 12. The system of claim 9,wherein the debugger detection mechanism checks for the presence of adebugger by performing one of the group consisting of detectinginterrupt requests for system resources and detecting of externalvectored exceptions.
 13. The system of claim 9, wherein if a debugger ispresent, the proxy execution engine selects a response from one of thegroup consisting of re-routing execution of the encrypted section ofcode, crashing the protected software, and intercepting an interruptassociated with the exception.
 14. The system of claim 13, wherein ifthe selected response is re-routing execution of the encrypted sectionof code, then the proxy execution engine transfers control to a dummyfunction.
 15. The system of claim 13, wherein if the selected responseis intercepting an interrupt associated with the exception, then theintercepted interrupt is removed and ignored by the debugger.
 16. Thesystem of claim 13, wherein if the selected response is crashing theprotected software, the result of the crash is an unexpected end to aprocess performed by the protected software.
 17. A computer-readablestorage medium having computer-executable instructions for, theinstructions comprising: instantiating protected software, wherein theprotected software comprises a protected binary code and an encryptedsection of code missing from the protected binary code, the encryptedsection of code having computer instructions necessary for execution ofthe protected binary, the protected binary code having calls to executerelevant portions of the computer instructions of the encrypted sectionof code using a proxy execution engine; executing the protected binarycode until a call to the proxy execution engine generates an exceptionand halts execution of the protected software; checking for the presenceof a debugger before starting execution of the encrypted section ofcode; and upon failure to detect a debugger, executing a relevantportion of the encrypted section of the protected software beforereturning the exception and continuing execution of the protected binarycode.
 18. The computer-readable storage medium of claim 17, furthercomprising: upon detecting a presence of a debugger, selecting aresponse to detection of the debugger from one of the group consistingof re-routing execution of the encrypted section of code, crashing theprotected software, and intercepting an interrupt associated with theexception, wherein operation of the debugger to reverse engineer theprotected software is prevented.
 19. The computer-readable storagemedium of claim 18, wherein if the selected response is re-routingexecution of the encrypted section of code, then the proxy executionengine transfers control to a dummy function.
 20. The computer-readablestorage medium of claim 18, wherein if the selected response isintercepting an interrupt associated with the exception, then theintercepted interrupt is removed and ignored by the debugger.